package com.itheima.dao;

import com.itheima.domain.Goods;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author itheima
 * @since 2021-10-28
 */
public interface OrderDao {

    @Select("SELECT g.id, goods_name, g.price FROM order_goods og \n" +
            "LEFT JOIN goods g ON og.goods_id = g.id\n" +
            "WHERE order_id = #{orderId}")
    List<Goods> selectByOrderId(String orderId);

}
